using System.Web.Security;
using Ninject.Modules;
using Microsoft.Services.NuGet.Server.Models;

namespace Microsoft.Services.NuGet.Server.Infrastructure
{
    public class Bindings : NinjectModule
    {
        public override void Load() 
        {
            var packageStore = new BuildPackageStore("http://sp2010:20000/tfs/defaultcollection");
            
            IServerPackageRepository packageRepository = new BuildPackageRepository("http://sp2010:20000/tfs/defaultcollection");

            Bind<IHashProvider>().To<CryptoHashProvider>();
            Bind<IPackageStore>().ToConstant(packageStore);
            Bind<IServerPackageRepository>().ToConstant(packageRepository);
            Bind<IFormsAuthenticationService>().To<FormsAuthenticationService>();
            Bind<IMembershipService>().To<AccountMembershipService>();
            Bind<MembershipProvider>().ToConstant(Membership.Provider);
        }
    }
}
